home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 03 Demos and Info / IMGFMT.TXT < prev    next >
Encoding:
Text File  |  2019-04-13  |  1.7 KB  |  60 lines

  1.  
  2.  
  3.  #: 56956      Sub-topic 7 - Terminal Programs
  4. Sb: #56952-Question
  5.     13-Jan-85  22:20:39
  6. Fm: CBM Sysop/deb! C.    70007,577
  7. To: Chrisdos   76703,717
  8.  
  9. Yes, Chris, we know exactly what you need to know.
  10.  
  11.           :::grin:::
  12.  
  13. But I thought *U* were supposed to be the whiz here?????
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. So, here goes, my tutorial on .IMG files
  24.  
  25. The first line of an .IMG file looks like this in the INTEL HEX:
  26.  
  27.  :180000000400434333500108...etc
  28.   ^^^^^^ <--- Those 3 bytes are the offset address of the file
  29.  :180000000400434333500108...etc
  30.         ^^ <-- That is a null, separating the data from the address
  31.  :180000000400434333500108...etc
  32.           ^^^^ <--- That is the number of characters in the .IMG header on the
  33. file, in standard Lo/Hi 6502 format.
  34. (there are 4 bytes in a 64 ID$ header)
  35.  :180000000400434333500108...etc
  36.               ^^^^^^ <--- Those 3 bytes are the Commodore 64 ID$ for VIDTEX.
  37.  :180000000400434333500108...etc
  38.                     ^^ <--- That byte represents whether it is a PRG or SEQ
  39. file
  40. $50=P  $53=S
  41.  :180000000400434333500108...etc
  42.                       ^^^^ <--- The first actual data bytes from the CBM file
  43. on the disk now    how here.  You will recognize this as a loading address for a
  44. standard beginning of BASIC file.
  45.  
  46. Now, in an XMODEM transfer of an IMAGE file, everything after the initial null
  47. delimiter between the offsett address and the header is sent.
  48.  
  49. Hence, the first character in XMODEM that is sent is $04-EOT for an IMAGE file.
  50.  
  51. There are six bytes there that are sent and must be stripped off at the
  52. beginning of the download.
  53.  
  54. Is this perfectlly clear???
  55.  
  56.               deb!
  57.  
  58. P.S. lets put this in a DL somewhere, I g     tired of explaining it...
  59.  
  60.